using UnityEngine;
using QFramework;

namespace ProjectSurviver
{
	public partial class Coin : GamePlayObject
	{
		public override Collider2D Collider2D => SelfCollider2D;

        void OnTriggerEnter2D(Collider2D other)
        {
            if(other.GetComponent<CollectableArea>())
			{
				AudioKit.PlaySound("Coin");
				Global.Coin.Value++;
				this.DestroyGameObjGracefully();
			}
        }
    }
}
